#!/bin/sh
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Stub to find and invoke gooftool main program.

basedir=$(readlink -f "$(dirname "$(readlink -f $0)")/../gooftool")
[ -f "$basedir/gooftool" ] || basedir=/usr/local/gooftool
[ -f "$basedir/gooftool" ] || basedir=/usr/gooftool

if [ ! -f "$basedir/gooftool" ]; then
  echo "ERROR: cannot find gooftool in system." >&2
  exit 1
fi

"$basedir/gooftool" "$@"
